package com.nhncorp.pleiades.ens;

import java.io.Serializable;

public class SpaceMessage implements Serializable{
  
  private static final long serialVersionUID = 1L;

  private String eventType;
  private String eventId;
  private String hostName;
  
  public SpaceMessage() {
    eventType = "";
    eventId = "";
    hostName = "";
  }
  
  public SpaceMessage(String type, String id, String name) {
    eventType = type;
    eventId = id;
    hostName = name;
  }
  
  public String getEventId() {
    return eventId;
  }
  public void setEventId(String eventId) {
    this.eventId = eventId;
  }
  public String getEventType() {
    return eventType;
  }
  public void setEventType(String eventType) {
    this.eventType = eventType;
  }
  public String getHostName() {
    return hostName;
  }
  public void setHostName(String hostName) {
    this.hostName = hostName;
  }
  public String toString() {
    StringBuffer eventKey = new StringBuffer(this.eventType);    
    if(!this.eventId.equals("")) {
      eventKey.append(",");
      eventKey.append(this.eventId);
    }
    eventKey.append("::");
    eventKey.append(this.hostName);
    return eventKey.toString();
  }

}
